package com.site.dao;

import com.site.pojo.CableSize;
import com.site.pojo.Goods;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * FileName: GoodsDao.java
 * 货物表Dao
 *
 * @author 田尚忠
 * @Date    2021/11/28
 * @version 1.00
 */
public interface GoodsDao {
    /*查询方法*/

        //查询全部
        List<Goods> selectAll() throws SQLException;

        //按照货物种类查询
        List<Goods> selectBytid(int id) throws SQLException;

        //通过商品id查询
        Goods selectByGoodsid(int id) throws SQLException;


    /*增加方法*/

        //新增加货物
        int addGodds(Goods goods);
        int addGodds(Connection conn,Goods goods);


    /*删除方法*/
        //通过id删除CircuitBoardSize
        int delElectricWireSizeByid(int id);
        int delElectricWireSizeByid(Connection conn,int id);

        //通过商品id删除CircuitBoardSize
        int delElectricWireSizeByGoodsid(int id);
        int delElectricWireSizeByGoodsid(Connection conn,int id);
    /*修改方法*/
        //通过goods_id修改
        int updateGoods(int id,Goods goods);
        int updateGoods(Connection conn, int id,Goods goods);
}
